<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.org/ui">
 
    <h:head>
    	<link rel="stylesheet" type="text/css" href="${verDetalhesLivroBean.linkCssLayoutPagina}" />
		<link href="CSS/styles.css" rel="stylesheet" type="text/css" />
		<link href="CSS/posicaoDoMenu.css" rel="stylesheet" type="text/css" />
        <title>editar resenha</title>
    </h:head>
    <h:body>
    <f:metadata>
        <f:event type="preRenderView" listener="#{verDetalhesLivroBean.carregarCSSLayoutParaQualquerPagina}"/>
	</f:metadata>
    <f:view>
    
    
    <div id="conteudopagina">
    <h1>Editar Resenha</h1>
    <h:form id = "formularionovaresenha">
    <p:messages/>
    <table style = "padding-left:20%">
    <tr>
    <td style = "vertical-align:top; text-align:right;">nome do resenhista:</td> 
    <td style = "text-align:left;"><h:inputText required="true" requiredMessage="campo obrigatório para preenchimento:seu nome" value = "#{verResenhasBean.autorResenhaEdicao}"></h:inputText></td>
    </tr>
    
    <tr>
    <td style = "vertical-align:top; text-align:right;">título da resenha:</td> 
    <td style = "text-align:left;"><h:inputText required="true" requiredMessage="campo obrigatório para preenchimento:título da resenha" value = "#{verResenhasBean.tituloResenhaParaEdicao}"></h:inputText>
    </td>
    </tr>
    
    <tr>
    <td style = "vertical-align:top; text-align:right;">nota do livro:</td>
    <td style = "text-align:left;"> 
    <h:selectOneMenu value = "#{verResenhasBean.notaResenhaParaEdicao}">
    <f:selectItem itemLabel = "péssimo" itemValue = "pessimo"/>
    <f:selectItem itemLabel = "ruim" itemValue = "ruim"/>
    <f:selectItem itemLabel = "bom" itemValue = "bom"/>
    <f:selectItem itemLabel = "muito bom" itemValue = "muito bom"/>
    <f:selectItem itemLabel = "excelente" itemValue = "excelente"/>
    </h:selectOneMenu>
    </td>
    </tr>
    
    <tr>
    <td style = "vertical-align:top; text-align:right;"> resenha:</td>
    <td style = "text-align:left;">
    <h:inputTextarea id = "resenha" rows="20" cols="50" required="true" requiredMessage="campo obrigatório para preenchimento:resenha" value = "#{verResenhasBean.descricaoResenhaEdicao}">
    <f:validator validatorId="validadorCampoPossuiPalavrao"/>
    </h:inputTextarea>
    </td>
    </tr>
    
    <tr>
    <td colspan = "2" style = "text-align:center">
    <h:commandButton value = "enviar resenha" action = "#{verResenhasBean.editarResenhaDaLista}" />
    </td>
    </tr>
    </table>
    
    
    </h:form>
    </div>
    </f:view>	
    </h:body>
</html>